Skip to content

mega iso pullari#29

Open
jeto wants to merge 12 commits into
masterfrom
local-dev-and-ci
Open

mega iso pullari#29
jeto wants to merge 12 commits into
masterfrom
local-dev-and-ci

Conversation

@jeto
Copy link
Copy Markdown
Collaborator

@jeto jeto commented May 22, 2026

siivoo vanhat paskat, uudet paskat tilalle
agenteille ohjeet, makrosandbox omaan konttiin, ci testit peliin

jeto added 8 commits May 23, 2026 01:13
- Switch main image from debian:10 (EOL) to node:18-slim
- Switch ircdjs from alpine:3.4 (no arm64) to node:18-alpine; pin
  commander@2 inside ircdjs node_modules to fix runtime incompatibility
- Update sqlite3 to v5.1.7 (has prebuilt arm64 binaries for Node 18)
- Remove usage package (V8 API removed in Node 18); rewrite !cpu
  using process.memoryUsage() and process.cpuUsage()
sandcastle's vm isolation depends on pre-Node-12 behaviour, so it
cannot run on the main Node 18 container. Extract it to a small
Express HTTP service (sandbox/) built on node:8-slim.

- sandbox/server.js: POST /run { code, arg } -> { result, error }
- features/sandcastle.js: replaces local SandCastle calls with axios
  POST to http://sandbox:3456/run; macro management (!addmacro etc.)
  remains local file I/O
- lib/api.js: remove dead require('../../../lib/simoInflux') that
  broke sandbox at runtime
- Add ircdjs service (local dev IRC server)
- Add sandbox service on port 3456
- Pin influxdb to 1.8 (latest tag is now v2 which dropped the v1 API)
The !*c/!*r wrapping added channel/nick to every message so the
+noargs/+noop system macros could strip them back out at the end of
the multicommand chain. This made the dispatch dependent on macros
not in the codebase.

Remove the wrapping. Commands go directly to multicommand; the
macrofy block now only fires when the user's own message contains
a !* hypermacro. Chaining and all macro conventions (+, _, *) work
identically without the wrapper.

Also disable the sendMetric call: the influxdb.writePoints() promise
was unhandled, crashing the Node 18 process on every command via
the InfluxDB v1 API rejection.
Wrap each feature require() in a try-catch so a single feature
failing to load (e.g. missing API key at module scope) logs a
warning instead of crashing the bot.
test/runner.js: connects to IRC, sends commands from a JSON file,
asserts responses by regex, exits 0/1. Env vars: IRC_HOST, IRC_PORT,
TEST_TIMEOUT_MS.

test/cases.json: 12 tests covering sandbox basics, all three macro
conventions (!+ takes arg, !_ prints, !* hypermacro chaining), and
a built-in feature.

test/client.js: interactive manual test client for local use.

.github/workflows/ci.yml: two jobs — 'build' validates images
compile, 'integration-tests' starts the stack and runs test/runner.js.
AGENTS.md: codebase guide for AI agents covering setup, architecture,
macro conventions, services table, and testing.

README.md: updated setup steps, separate local dev section for ircdjs,
add testing command, remove dead Firebase project screenshot.

settings.json.example: add all keys that features read at load time
(openai, stablediffusionReplicate, dalle, stabilityAI) so cp from
example works without manual patching.
- Remove SimoStats: AngularJS dashboard that read from a Firebase
  project (simocmds.firebaseio.com) using v1.0 APIs from 2014 — long dead
- Remove testscript and test.log: a pre-CI docker-compose timeout
  script and its output, superseded by the GitHub Actions workflow
- main.js: remove unused underscore import, dead simoInflux require,
  commented console.logs, and the sendMetric value calculation block
- lib/api.js: remove dead niksi helper and commented sendMetric export
@jeto jeto requested a review from Tsarpf May 22, 2026 22:20
jeto added 4 commits May 23, 2026 01:23
test.log and testscript were removed in the cleanup commit
but the Dockerfile ADD line still referenced them.
- docker-compose.yml: production services (simojs, sandbox, redis,
  pythonsimo, influxdb). llama moved to a compose profile so it is
  excluded by default; start with --profile llama after placing a
  model under ./models/. Used by !simogpt and !simoq.
- docker-compose.override.yml: adds ircdjs for local dev and CI.
  Auto-merged by docker compose; skip with -f docker-compose.yml for
  production deploys.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant